<?php

class indexControl extends Control {

    function index() {
        $rbac = new rbac();
        $r = $rbac->getNodeList();
        $db = M("category");
        $channel = $db->all();
        $f = arr::channel($channel, 'catid', 'pid', 0, 1);

        $this->assign("a", array("a1" => 22));
        $this->assign("b", array("b1" => "a1"));
        $this->display();
    }

    function arc() {
        $tplDir = C("TPL_DIR") . '/' . C("tplstyle"); //模板目录 
        $db = K("admin/newsView");
        $field = $db->join("news_data,category")->find($_GET['id']);

        $this->assign("a", array("a1" => 1));
        $this->assign("b", array("b1" => "a1"));
        $this->assign("field", $field);
        $tplFile = $tplDir . '/' . $field['contpl'];
        $this->display($tplFile);
    }

}